﻿<%@ Page Title="Title" Language="C#" Inherits="System.Web.Mvc.ViewPage<DiplomaWeb.Models.Reviewer.StudentProgressViewModel>"
    MasterPageFile="~/Views/Shared/Site.Master" %>

<asp:Content runat="server" ID="Scripts" ContentPlaceHolderID="ScriptsContent">
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#Groups").change(function () {
                var selectValue = $(this).val();
                $("#student-stats").html('');
                var path = '<%:Url.RouteUrl("Default", new {controller = "Reviewer", action = "StudentsPart"})%>';
                $.ajax({
                    url: path,
                    type: "POST",
                    async: false,
                    data: ({ groupId: selectValue }),
                    success: function (data) {
                        $("#student-list").html(data);
                    }
                });
            });
        });
    </script>
</asp:Content>
<asp:Content runat="server" ID="Title" ContentPlaceHolderID="TitleContent">
    Студенты
</asp:Content>
<asp:Content runat="server" ID="Tabs" ContentPlaceHolderID="TabsContent">
</asp:Content>
<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent">
    <div>
        <div id="student-group"><%= Html.DropDownList("Groups", Model.Groups) %></div>
        <div id="student-list"><%= Model.IsSaved ? "Сохранено" : String.Empty %></div>
        <div id="student-stats"></div>
    </div>
</asp:Content>